(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

f(y, f(x, f(a, x))) → f(f(f(a, x), f(x, a)), f(a, y))
f(x, f(x, y)) → f(f(f(x, a), a), a)

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(z1, f(a, z1))) → f(f(f(a, z1), f(z1, a)), f(a, z0))
f(z0, f(z0, z1)) → f(f(f(z0, a), a), a)
Tuples:

F(z0, f(z1, f(a, z1))) → c(F(f(f(a, z1), f(z1, a)), f(a, z0)), F(f(a, z1), f(z1, a)), F(a, z1), F(z1, a), F(a, z0))
F(z0, f(z0, z1)) → c1(F(f(f(z0, a), a), a), F(f(z0, a), a), F(z0, a))
S tuples:

F(z0, f(z1, f(a, z1))) → c(F(f(f(a, z1), f(z1, a)), f(a, z0)), F(f(a, z1), f(z1, a)), F(a, z1), F(z1, a), F(a, z0))
F(z0, f(z0, z1)) → c1(F(f(f(z0, a), a), a), F(f(z0, a), a), F(z0, a))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c, c1

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing nodes:

F(z0, f(z0, z1)) → c1(F(f(f(z0, a), a), a), F(f(z0, a), a), F(z0, a))

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(z1, f(a, z1))) → f(f(f(a, z1), f(z1, a)), f(a, z0))
f(z0, f(z0, z1)) → f(f(f(z0, a), a), a)
Tuples:

F(z0, f(z1, f(a, z1))) → c(F(f(f(a, z1), f(z1, a)), f(a, z0)), F(f(a, z1), f(z1, a)), F(a, z1), F(z1, a), F(a, z0))
S tuples:

F(z0, f(z1, f(a, z1))) → c(F(f(f(a, z1), f(z1, a)), f(a, z0)), F(f(a, z1), f(z1, a)), F(a, z1), F(z1, a), F(a, z0))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c

(5) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace F(z0, f(z1, f(a, z1))) → c(F(f(f(a, z1), f(z1, a)), f(a, z0)), F(f(a, z1), f(z1, a)), F(a, z1), F(z1, a), F(a, z0)) by

F(f(z1, f(a, z1)), f(x1, f(a, x1))) → c(F(f(f(a, x1), f(x1, a)), f(f(f(a, z1), f(z1, a)), f(a, a))), F(f(a, x1), f(x1, a)), F(a, x1), F(x1, a), F(a, f(z1, f(a, z1))))
F(f(a, z1), f(x1, f(a, x1))) → c(F(f(f(a, x1), f(x1, a)), f(f(f(a, a), a), a)), F(f(a, x1), f(x1, a)), F(a, x1), F(x1, a), F(a, f(a, z1)))
F(x0, f(x1, f(a, x1))) → c(F(a, x1))

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(z1, f(a, z1))) → f(f(f(a, z1), f(z1, a)), f(a, z0))
f(z0, f(z0, z1)) → f(f(f(z0, a), a), a)
Tuples:

F(f(z1, f(a, z1)), f(x1, f(a, x1))) → c(F(f(f(a, x1), f(x1, a)), f(f(f(a, z1), f(z1, a)), f(a, a))), F(f(a, x1), f(x1, a)), F(a, x1), F(x1, a), F(a, f(z1, f(a, z1))))
F(f(a, z1), f(x1, f(a, x1))) → c(F(f(f(a, x1), f(x1, a)), f(f(f(a, a), a), a)), F(f(a, x1), f(x1, a)), F(a, x1), F(x1, a), F(a, f(a, z1)))
F(x0, f(x1, f(a, x1))) → c(F(a, x1))
S tuples:

F(f(z1, f(a, z1)), f(x1, f(a, x1))) → c(F(f(f(a, x1), f(x1, a)), f(f(f(a, z1), f(z1, a)), f(a, a))), F(f(a, x1), f(x1, a)), F(a, x1), F(x1, a), F(a, f(z1, f(a, z1))))
F(f(a, z1), f(x1, f(a, x1))) → c(F(f(f(a, x1), f(x1, a)), f(f(f(a, a), a), a)), F(f(a, x1), f(x1, a)), F(a, x1), F(x1, a), F(a, f(a, z1)))
F(x0, f(x1, f(a, x1))) → c(F(a, x1))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c, c

(7) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 2 leading nodes:

F(f(z1, f(a, z1)), f(x1, f(a, x1))) → c(F(f(f(a, x1), f(x1, a)), f(f(f(a, z1), f(z1, a)), f(a, a))), F(f(a, x1), f(x1, a)), F(a, x1), F(x1, a), F(a, f(z1, f(a, z1))))
F(f(a, z1), f(x1, f(a, x1))) → c(F(f(f(a, x1), f(x1, a)), f(f(f(a, a), a), a)), F(f(a, x1), f(x1, a)), F(a, x1), F(x1, a), F(a, f(a, z1)))

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(z1, f(a, z1))) → f(f(f(a, z1), f(z1, a)), f(a, z0))
f(z0, f(z0, z1)) → f(f(f(z0, a), a), a)
Tuples:

F(x0, f(x1, f(a, x1))) → c(F(a, x1))
S tuples:

F(x0, f(x1, f(a, x1))) → c(F(a, x1))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c

(9) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

F(x0, f(x1, f(a, x1))) → c(F(a, x1))
We considered the (Usable) Rules:none
And the Tuples:

F(x0, f(x1, f(a, x1))) → c(F(a, x1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F(x1, x2)) = [3]x1 + x2   
POL(a) = [5]   
POL(c(x1)) = x1   
POL(f(x1, x2)) = [4]x1 + [2]x2   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, f(z1, f(a, z1))) → f(f(f(a, z1), f(z1, a)), f(a, z0))
f(z0, f(z0, z1)) → f(f(f(z0, a), a), a)
Tuples:

F(x0, f(x1, f(a, x1))) → c(F(a, x1))
S tuples:none
K tuples:

F(x0, f(x1, f(a, x1))) → c(F(a, x1))
Defined Rule Symbols:

f

Defined Pair Symbols:

F

Compound Symbols:

c

(11) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(12) BOUNDS(O(1), O(1))